<!Doctype html>
<html xmlns=http://www.w3.org/1999/xhtml>
<head>                  
	<meta http-equiv=Content-Type content="text/html;charset=utf-8">
	<meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
	<meta content=always name=referrer>
	<title>OpenLayers 3地图示例</title>

	<link href="./css/ol.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="./js/ol.js" charset="utf-8"></script>
</head>

<body>
	<div id="googleMap" style="width: 100%"></div>
	<script>
		// google地图层
		var googleMapLayer = new ol.layer.Tile({
			source: new ol.source.XYZ({
				url:'http://www.google.cn/maps/vt/pb=!1m4!1m3!1i{z}!2i{x}!3i{y}!2m3!1e0!2sm!3i345013117!3m8!2szh-CN!3scn!5e1105!12m4!1e68!2m2!1sset!2sRoadmap!4e0'
			})
		});

		// 创建地图
	  var map = new ol.Map({
			layers: [
				googleMapLayer
			],
			view: new ol.View({
				// 设置成都为地图中心
				center: [104.06, 30.67],
				projection: 'EPSG:4326',
				zoom: 10
			}),
			target: 'googleMap'
	  });
	</script>
</body>
	
</html>